//
//  OosEnumTest.m
//  oos4ios
//
//  Created by Pablo Gonzalez on 3/4/11.
//  Copyright 2011 11870.com. All rights reserved.
//
#ifdef OOS_TESTING
#import <SenTestingKit/SenTestingKit.h>
#import <oos4ios/Options/OosOrder.h>

@interface OosEnumTests : SenTestCase

- (void) testOosEnum;

@end


@implementation OosEnumTests

- (void) testOosEnum
{
	STAssertNotNil([OosOrder contacts], 
				   @"OosOrder.contact enum should have a value");
	STAssertNotNil([OosOrder content], 
				   @"OosOrder.content enum should have a value");
	STAssertNotNil([OosOrder rating], 
				   @"OosOrder.rating enum should have a value");
	STAssertNotNil([OosOrder date], 
				   @"OosOrder.date enum should have a value");
	STAssertNotNil([OosOrder distance], 
				   @"OosOrder.distance enum should have a value");
	switch ([[OosOrder contacts] ordinal]) {
		case ORDER_CONTACTS:
			break;
		default:
			STAssertTrue(FALSE, 
			@"The default section in the switch should not be reached");
			break;
	}
	STAssertTrue([[[OosOrder contacts] description] isEqual:@"contacts"],
				 @"The contacts enums has not the right description");
}

@end

#endif